$(() => {
    window.payOrderSuccess = function(payType) {
        let orderNumber = $("#orderNoValue").val();
        $.ajax({
            type: 'GET',
            url: ctx+"/shopping/paySuccess?payType="+payType+"&orderNumber=" + orderNumber,
            success: function (resp) {
                if (resp.code == "200") {
                    //成功之后跳转到详情页面
                    window.location.href = "/shopping/orders/" + orderNumber;
                } else {
                    Swal.fire({
                        text: resp.msg,
                        icon: "error",iconColor:"#f05b72",
                    });
                }
            },
            error: function () {
                Swal.fire({
                    text: "操作失败",
                    icon: "error",iconColor:"#f05b72",
                });
            }
        });
    };
});
